<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "me_user_profile".
 *
 * @property integer $userid
 * @property integer $gradeid
 * @property string $username
 * @property string $phone
 * @property string $truename
 * @property string $invite_code
 * @property string $alipay
 * @property string $qq
 * @property string $headerimg
 * @property integer $created_at
 * @property integer $updated_at
 */
class UserProfile extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'me_user_profile';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['userid'], 'required'],
            [['userid', 'gradeid', 'created_at', 'updated_at'], 'integer'],
            [['username', 'truename'], 'string', 'max' => 50],
            [['phone', 'qq'], 'string', 'max' => 20],
            [['invite_code'], 'string', 'max' => 10],
            [['alipay'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'userid' => '用户ID',
            'gradeid' => '代理编号',
            'username' => '姓名',
            'phone' => '手机号',
            'truename' => '真实姓名',
            'invite_code' => '邀请码',
            'alipay' => '支付宝',
            'qq' => 'QQ号码',
            'headerimg'=>"用户头像",
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }
}
